--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Commit c62f7511e6532b8f5858b2cc33d80f7c81ff8f9f
Parents : aee1f6a
Author : Mark Qvist <bc7291552be7a58f361522990465165c>
Signature : T66BB85Valid, signed by author
Date : 2026-05-28T14:11:34+02:00
Ensure jump_to_anchor doesn't run before layout caching is complete
Changes
2 files changed, 18 insertions(+), 7 deletions(-)
Diff
diff --git a/nomadnet/ui/textui/Browser.py b/nomadnet/ui/textui/Browser.py
index c7630c1..90eaff4 100644
--- a/nomadnet/ui/textui/Browser.py
+++ b/nomadnet/ui/textui/Browser.py
@@ -270,7 +270,8 @@ class Browser:
# In-document anchor link (#name or empty #)
if link_target.startswith("#"):
- self._jump_to_anchor(link_target[1:])
+ def df(loop, user_data): self._jump_to_anchor(link_target[1:])
+ nomadnet.NomadNetworkApp.get_shared_instance().ui.loop.set_alarm_in(0.0, df)
return
# rrc://<hex>[:<dest_name>]/<room> URL form
@@ -1287,6 +1288,10 @@ class Browser:
self.history_inc = False
self.reloading = False
+ if self.request_data and "var_anchor" in self.request_data:
+ def df(loop, user_data): self._jump_to_anchor(self.request_data["var_anchor"])
+ nomadnet.NomadNetworkApp.get_shared_instance().ui.loop.set_alarm_in(0.0, df)
+
else:
if self.destination_hash != self.loopback:
load_thread = threading.Thread(target=self.__load)
@@ -1362,6 +1367,10 @@ class Browser:
self.history_inc = False
self.reloading = False
+ if self.request_data and "var_anchor" in self.request_data:
+ def df(loop, user_data): self._jump_to_anchor(self.request_data["var_anchor"])
+ nomadnet.NomadNetworkApp.get_shared_instance().ui.loop.set_alarm_in(0.0, df)
+
def __load(self):
# If an established link exists, but it doesn't match the target
@@ -1537,7 +1546,8 @@ class Browser:
self.cache_page(cache_time)
if self.request_data and "var_anchor" in self.request_data:
- self._jump_to_anchor(self.request_data["var_anchor"])
+ def df(loop, user_data): self._jump_to_anchor(self.request_data["var_anchor"])
+ nomadnet.NomadNetworkApp.get_shared_instance().ui.loop.set_alarm_in(0.0, df)
except Exception as e:
RNS.log("An error occurred while handling response. The contained exception was: "+str(e))
diff --git a/nomadnet/ui/textui/Guide.py b/nomadnet/ui/textui/Guide.py
index 1995e0f..4316266 100644
--- a/nomadnet/ui/textui/Guide.py
+++ b/nomadnet/ui/textui/Guide.py
@@ -106,7 +106,8 @@ class GuideLinkDelegate:
if target.startswith("#"):
if self.reader is not None:
try:
- self.reader.jump_to_anchor(target[1:])
+ def df(loop, user_data): self.reader.jump_to_anchor(target[1:])
+ nomadnet.NomadNetworkApp.get_shared_instance().ui.loop.set_alarm_in(0.0, df)
except Exception as e:
RNS.log("Guide anchor jump failed: "+str(e), RNS.LOG_ERROR)
return
@@ -293,7 +294,7 @@ Nomad Network is build on LXMF and Reticulum, which together provides the crypto
Nomad Network does not need any connections to the public internet to work. In fact, it doesn't even need an IP or Ethernet network. You can use it entirely over packet radio, LoRa or even serial lines. But if you wish, you can bridge islanded Reticulum networks over the Internet or private ethernet networks, or you can build networks running completely over the Internet. The choice is yours.
-The current version of the program should be considered a beta release. The program works well, but there will most probably be bugs and possibly sub-optimal performance in some scenarios. On the other hand, this is the best time to have an influence on the direction of the development of Nomad Network. To do so, join the discussion on the Nomad Network project at `_`F00f`[Aleph git`a8d24177d946de4f1f0a0fe1af9a1338:/page/index.mu]`f`_.
+The current version of the program should be considered a beta release. The program works well, but there will most probably be bugs and possibly sub-optimal performance in some scenarios. On the other hand, this is the best time to have an influence on the direction of the development of Nomad Network. To do so, join the discussion on the Nomad Network project at `_`F79d`[Aleph git`a8d24177d946de4f1f0a0fe1af9a1338:/page/index.mu]`f`_.
'''
@@ -1623,7 +1624,7 @@ Here is a link without any label: `[72914442a3689add83a09a767963f57c:/page/index
This is a `[labeled link`72914442a3689add83a09a767963f57c:/page/index.mu] to the same page, but it's hard to see if you don't know it
-Here is `F00a`_`[a more visible link`72914442a3689add83a09a767963f57c:/page/index.mu]`_`f
+Here is `F79d`_`[a more visible link`72914442a3689add83a09a767963f57c:/page/index.mu]`_`f
`=
``
@@ -1635,7 +1636,7 @@ Here is a link without any label: `[72914442a3689add83a09a767963f57c:/page/index
This is a `[labeled link`72914442a3689add83a09a767963f57c:/page/index.mu] to the same page, but it's hard to see if you don't know it
-Here is `F00f`_`[a more visible link`72914442a3689add83a09a767963f57c:/page/index.mu]`_`f
+Here is `F79d`_`[a more visible link`72914442a3689add83a09a767963f57c:/page/index.mu]`_`f
``
@@ -1726,7 +1727,7 @@ The above markup produces the following table:
>Fields & Requests
-Nomad Network let's you use simple input fields for submitting data to node-side applications. Submitted data, along with other session variables will be available to the node-side script / program as environment variables.
+Nomad Network lets you use simple input fields for submitting data to node-side applications. Submitted data, along with other session variables will be available to the node-side script / program as environment variables.
>>Request Links
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────